package reflect;

import java.util.Arrays;

/**
 * 变长参数
 * String... s 加...
 */
public class ArgsDemo {
    public static void main(String[] args) {
        dosome();
        dosome("a","b","c");
        dosome("a","b","c","a","b","c","a","b","c","a","b","c","a","b","c","a","b","c");

    }
    /*
       边长参要求：一个方法只能有一个边长参数，且必须是最后一个参数
     */
    // public static void dosome(String... s)
    public static void dosome(String... s){
        System.out.println(s.length);
        System.out.println(Arrays.toString(s));

    }
}
